Guide to Programming and Algorithms Using R by Özgür Ergül

Guide to Programming and Algorithms Using R by Özgür Ergül

Author:Özgür Ergül
Language: eng
Format: epub
Publisher: Springer London, London


Using Factorial

Unstable

Using the Pascal’s Triangle

if j≈i/2

Stable

Recursive

Stable

4.6 Conclusions

For a given problem, it is essential to compare different programs and algorithms in terms of efficiency and/or accuracy. Efficiency refers to the speed of programs and algorithms, as well as to the amount of memory required by them. For both speed and memory usage, the efficiency of a program/algorithm naturally depends on its inputs.

This chapter is devoted to estimating processing time and memory costs of computer programs. For a given program, a rigorous approach can be followed by counting each operation and each piece of storage to find the complexity of the program as well as the underlying algorithm. At the same time, we are more interested in the efficiency of programs when input sizes/values are large so that time and memory costs are significant. This leads to an asymptotic analysis to find orders from complexities and to use the resulting neat expressions for assessing the efficiency of implementations. This chapter also discusses some shortcuts to calculate the orders of programs and algorithms by finding critical lines and items in the codes.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.